package com.u3k.mid;

import com.u3k.app.mid.utils.net.Callback;
import com.u3k.app.mid.utils.statistics.StatisticsManager;

class c implements Callback {
    final /* synthetic */ b a;

    c(b bVar) {
        this.a = bVar;
    }

    public void onFailure(int i, String str) {
        LogUtils.LogError("HeartbeatManager", "heartbeatRequest  errMsg=" + str);
        if (this.a.d != null) {
            this.a.d.onFailed(str);
        }
        StatisticsManager.getInstance().postLog(this.a.e.mContext);
    }

    public void onResponse(com.u3k.app.mid.utils.net.Response r7) {
        /* JADX: method processing error */
/*
Error: java.lang.NullPointerException
	at jadx.core.dex.visitors.ssa.SSATransform.placePhi(SSATransform.java:82)
	at jadx.core.dex.visitors.ssa.SSATransform.process(SSATransform.java:50)
	at jadx.core.dex.visitors.ssa.SSATransform.visit(SSATransform.java:42)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
	at jadx.core.ProcessClass.process(ProcessClass.java:34)
	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)
	at jadx.api.JavaClass.decompile(JavaClass.java:62)
	at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
*/
        /*
        r6 = this;
        r0 = r7.getString();
        r1 = r6.a;
        r1 = r1.e;
        r2 = "HeartbeatManager";
        r3 = new java.lang.StringBuilder;
        r3.<init>();
        r4 = "heartbeatRequest  0706 response = ";
        r3 = r3.append(r4);
        r3 = r3.append(r0);
        r3 = r3.toString();
        r4 = 4000; // 0xfa0 float:5.605E-42 double:1.9763E-320;
        r1.longLog(r2, r3, r4);
        r1 = new org.json.JSONObject;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1.<init>(r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = "result";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r1.getString(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r2 == 0) goto L_0x0037;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x002f:
        r3 = "0";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r2.equals(r3);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r2 == 0) goto L_0x0052;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x0037:
        r1 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1 = r1.d;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r1 == 0) goto L_0x0044;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x003d:
        r1 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1 = r1.d;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1.onFailed(r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x0044:
        r0 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r1 = r6.a;
        r1 = r1.e;
        r1 = r1.mContext;
        r0.postLog(r1);
    L_0x0051:
        return;
    L_0x0052:
        r0 = "rereg";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = r1.has(r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r0 == 0) goto L_0x0077;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x005a:
        r0 = "rereg";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = r1.getInt(r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = 1;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r0 != r2) goto L_0x0077;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x0063:
        r0 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = r0.e;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = r0.mContext;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = com.u3k.app.mid.RegisterManager.getInstance(r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r2.e;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r2.mContext;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = 0;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0.register(r2, r3);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x0077:
        r0 = "";
        r2 = "modules";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r1.has(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r2 == 0) goto L_0x008b;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x0081:
        r0 = "modules";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = r1.getJSONObject(r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = r0.toString();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x008b:
        r2 = "logExc";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r1.has(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r2 == 0) goto L_0x00c6;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x0093:
        r2 = "logExc";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r1.getString(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = "HeartbeatManager";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r4 = new java.lang.StringBuilder;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r4.<init>();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r5 = "heartbeatRequest  logException = ";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r4 = r4.append(r5);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r4 = r4.append(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r4 = r4.toString();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        com.u3k.mid.au.b(r3, r4);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = r3.e;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = r3.mContext;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r4 = "KEY_LOG_EXC";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r5 = "1";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r5.equals(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = java.lang.Boolean.valueOf(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        com.u3k.mid.bb.a(r3, r4, r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x00c6:
        r2 = "duration";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r1.has(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r2 == 0) goto L_0x00fd;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x00ce:
        r2 = "duration";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1 = r1.getInt(r2);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = "HeartbeatManager";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = new java.lang.StringBuilder;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3.<init>();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r4 = "heartbeatRequest  duration = ";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = r3.append(r4);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = r3.append(r1);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = r3.toString();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        com.u3k.mid.au.b(r2, r3);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r2.e;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = r2.mContext;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = "check_update_interval";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1 = r1 * 1000;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1 = java.lang.Integer.valueOf(r1);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        com.u3k.mid.bb.a(r2, r3, r1);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x00fd:
        r1 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1 = r1.d;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r1 == 0) goto L_0x010a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x0103:
        r1 = r6.a;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1 = r1.d;	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r1.onSuccess(r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
    L_0x010a:
        r0 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r1 = r6.a;
        r1 = r1.e;
        r1 = r1.mContext;
        r0.postLog(r1);
        goto L_0x0051;
    L_0x0119:
        r0 = move-exception;
        r1 = "HeartbeatManager";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2 = "heartbeatRequest>>>";	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        com.u3k.mid.au.a(r1, r2, r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        if (r0 != 0) goto L_0x014c;
    L_0x0123:
        r1 = "";
    L_0x0125:
        r2 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r3 = com.u3k.mid.ae.a();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r2.logException(r3, r0);	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        r0 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r2 = r6.a;
        r2 = r2.e;
        r2 = r2.mContext;
        r0.postLog(r2);
        r0 = r6.a;
        r0 = r0.d;
        if (r0 == 0) goto L_0x0051;
    L_0x0143:
        r0 = r6.a;
        r0 = r0.d;
        r0.onFailed(r1);
        goto L_0x0051;
    L_0x014c:
        r1 = r0.getMessage();	 Catch:{ Exception -> 0x0119, all -> 0x0151 }
        goto L_0x0125;
    L_0x0151:
        r0 = move-exception;
        r1 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r2 = r6.a;
        r2 = r2.e;
        r2 = r2.mContext;
        r1.postLog(r2);
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.u3k.mid.c.onResponse(com.u3k.app.mid.utils.net.Response):void");
    }
}
